<section class="grafana-metric-options">
	<div class="gf-form-group">
		<div class="gf-form-inline">
			<div class="gf-form">
				<span class="gf-form-label"><i class="fa fa-wrench"></i></span>
				<span class="gf-form-label width-11">Group by time interval</span>
				<input type="text" class="gf-form-input width-16" ng-model="ctrl.panelCtrl.panel.interval" ng-blur="ctrl.panelCtrl.refresh();"
				spellcheck='false' placeholder="example: >10s">
				<info-popover mode="right-absolute">
          Set a low limit by having a greater sign: example: >60s
        </info-popover>
			</div>
		</div>
		<div class="gf-form-inline">
			<div class="gf-form">
				<span class="gf-form-label width-10">
					<a ng-click="ctrl.panelCtrl.toggleEditorHelp(1);" bs-tooltip="'click to show helpful info'" data-placement="bottom">
						<i class="fa fa-info-circle"></i>
						&nbsp;alias patterns
					</a>
				</span>
				<span class="gf-form-label width-10">
					<a ng-click="ctrl.panelCtrl.toggleEditorHelp(2)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
					<i class="fa fa-info-circle"></i>
						&nbsp;stacking &amp; fill
					</a>
				</span>
				<span class="gf-form-label width-10">
					<a ng-click="ctrl.panelCtrl.toggleEditorHelp(3)" bs-tooltip="'click to show helpful info'" data-placement="bottom">
					<i class="fa fa-info-circle"></i>
						&nbsp;group by time
					</a>
				</span>
			</div>
		</div>
	</div>
</section>

<div class="editor-row">
	<div class="pull-left">

		<div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 1">
			<h5>Alias patterns</h5>
			<ul>
				<li>$m = replaced with measurement name</li>
				<li>$measurement = replaced with measurement name</li>
				<li>$1 - $9 = replaced with part of measurement name (if you separate your measurement name with dots)</li>
				<li>$col = replaced with column name</li>
				<li>$tag_hostname = replaced with the value of the hostname tag</li>
				<li>You can also use [[tag_hostname]] pattern replacement syntax</li>
			</ul>
		</div>

		<div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 2">
			<h5>Stacking and fill</h5>
			<ul>
				<li>When stacking is enabled it important that points align</li>
				<li>If there are missing points for one series it can cause gaps or missing bars</li>
				<li>You must use fill(0), and select a group by time low limit</li>
				<li>Use the group by time option below your queries and specify for example &gt;10s if your metrics are written every 10 seconds</li>
				<li>This will insert zeros for series that are missing measurements and will make stacking work properly</li>
			</ul>
		</div>

		<div class="grafana-info-box span6" ng-if="ctrl.panelCtrl.editorHelpIndex === 3">
			<h5>Group by time</h5>
			<ul>
				<li>Group by time is important, otherwise the query could return many thousands of datapoints that will slow down Grafana</li>
				<li>Leave the group by time field empty for each query and it will be calculated based on time range and pixel width of the graph</li>
				<li>If you use fill(0) or fill(null) set a low limit for the auto group by time interval</li>
				<li>The low limit can only be set in the group by time option below your queries</li>
				<li>You set a low limit by adding a greater sign before the interval</li>
				<li>Example: &gt;60s if you write metrics to InfluxDB every 60 seconds</li>
			</ul>
		</div>
	</div>
</div>


